package com.binarysoft.service.common.ping;

import java.io.Serializable;
import java.net.InetAddress;

/**
 * 
 * 
 * @author Li Xu
 *
 */
public class PingResult implements Serializable {
	
	private static final long serialVersionUID = -7759700681629534355L;
	
	private InetAddress target = null;
	private int dataByteLength;
	private double rtt;
	private int ttl;
	private boolean timedout = false;//default value
	

	public boolean isTimedout() {
		return timedout;
	}
	public void setTimedout(boolean timedout) {
		this.timedout = timedout;
	}
	public int getDataByteLength() {
		return dataByteLength;
	}
	public void setDataByteLength(int dataByteLength) {
		this.dataByteLength = dataByteLength;
	}
	public double getRtt() {
		return rtt;
	}
	public void setRtt(double returnTime) {
		this.rtt = returnTime;
	}
	public InetAddress getTarget() {
		return target;
	}
	public void setTarget(InetAddress srcAddr) {
		this.target = srcAddr;
	}
	public int getTtl() {
		return ttl;
	}
	public void setTtl(int timeToLive) {
		this.ttl = timeToLive;
	}
	
	
	
	public String toString(){
		return "target:"+target.getHostAddress()+", dataByteLength:"+dataByteLength
			+", timedout:"+timedout+", roundTripTime:"+rtt+", timeToLive:"+ttl;
	}
	
	
}
